From 0f856f3902c0782ebb6c5989defccb2333818f08 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 7 Oct 2024 14:58:15 +0700
Subject: bugfix required state on update alamat

---
 src/pages/my/address/[id]/edit.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/pages/my/address/[id]/edit.jsx')

diff --git a/src/pages/my/address/[id]/edit.jsx b/src/pages/my/address/[id]/edit.jsx
index c552659b..c126b290 100644
--- a/src/pages/my/address/[id]/edit.jsx
+++ b/src/pages/my/address/[id]/edit.jsx
@@ -37,12 +37,15 @@ export async function getServerSideProps(context) {
     mobile: address.mobile,
     street: address.street,
     zip: address.zip,
-    city: address.city?.id || '',
+    state: address.stateId?.id || '',
+    oldCity: address.city?.id || '',
+    city: '',
     oldDistrict: address.district?.id || '',
     district: '',
     oldSubDistrict: address.subDistrict?.id || '',
     subDistrict: '',
     business_name: '',
   };
+  console.log('ini default',defaultValues);
   return { props: { id, defaultValues } };
 }
-- 
cgit v1.2.3

